layui.extend({
	commonMock: "mock/common",
}).define(["commonMock", "BaseServices", "apiCommon", "utils"], function (exports) {
	var BaseServices = layui.BaseServices,
		commonMock = layui.commonMock,
		apiModule = layui.apiCommon,
		utils = layui.utils;
	commonMock();

	function CommonServices(apiModule) {
		BaseServices.apply(this, arguments);
	}
	utils.inheritPrototype(CommonServices, BaseServices);
	/**
	 * @author: ares
	 * @date: 2021/4/28 9:17
	 * @description: 获取主菜单
	 */
	CommonServices.prototype.getMainMenu = function () {
		return this.service(this.apiModule.api.getMainMenu);
	}
	/**
	 * @author: ares
	 * @date: 2021/4/28 9:17
	 * @description: 获取侧边菜单
	 * @param {string}mainMenuId  主菜单id
	 */
	CommonServices.prototype.getSideMenu = function (mainMenuId) {
		var params = {mainMenuId: mainMenuId};
		return this.service(this.apiModule.api.getSideMenu, {params: params});
	}
	/**
	 * @author: ares
	 * @date: 2020/2/2 19:55
	 * @description: 获取未读消息数量
	 */
	CommonServices.prototype.getUnreadMsgCount = function () {
		return this.service(this.apiModule.api.getUnreadMsgCount);
	}


	exports("commonServices", new CommonServices(apiModule));
});
